"""
urls
Administrator
2023/12/4
convergence_server
"""
from rest_framework_simplejwt.views import TokenRefreshView, TokenVerifyView
from rest_framework import routers
from django.urls import include, path

from user.views import *

router = routers.DefaultRouter()

router.register('register', UserRegisterView, basename='user_register'),
router.register('group', UserGroupView, basename='group'),
router.register('user_info', UserInfoView, basename='user_info'),
router.register('message', MessageViewSet, basename='messagelist'),
# router.register('update_password', UpdatePasswordViewSet, basename="update_password")
router.register('update_password_web', UpdateWebPasswordViewSet, basename="update_password")
router.register('platefrom', UserAccountBindViewSets, basename='user_platefrom'),
router.register('employeeList', UserEmployeeView, basename='UserEmployeeView'),
router.register('list', UserListView, basename='list'),

app_name = 'user'

urlpatterns = [
    # 令牌获取与更新
    path('login/', MyTokenObtainPairView.as_view(), name='login'),
    path('refresh/', TokenRefreshView.as_view(), name='refresh'),
    path('verify/', TokenVerifyView.as_view(), name='verify'),

    path('', include(router.urls)),
]
